Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat]: add cluster template, use CAAPH to install cilium for the CNI #96

Merged
merged 7 commits into from
Feb 9, 2024

Conversation

AshleyDumaine
Copy link
Contributor

@AshleyDumaine AshleyDumaine commented Feb 8, 2024

This adds CAAPH (https://github.com/kubernetes-sigs/cluster-api-addon-provider-helm) into the KIND management created by Tilt to install Cilium via the helm controller. We are doing this instead of using postKubeadmCommands because we need to be able to retry in the case of transient failures with reaching the control plane.

Using this template, it is possible to set env vars and use envstubst to create a cluster in a one-liner:

envsubst "`printf '${%s} ' $(sh -c "env|cut -d'=' -f1")`" < templates/cluster-template.yaml | kubectl apply -f -

Result:

(⎈|kind-tilt:N/A) ~  clusterctl describe cluster adumaine-1
NAME                                                           READY  SEVERITY  REASON  SINCE  MESSAGE
Cluster/adumaine-1                                             True                     5m28s
├─ClusterInfrastructure - LinodeCluster/adumaine-1             True                     9m55s
├─ControlPlane - KubeadmControlPlane/adumaine-1-control-plane  True                     5m28s
│ └─Machine/adumaine-1-control-plane-27qv8                     True                     8m50s
└─Workers
  └─MachineDeployment/adumaine-1-md-0                          True                     5s
    └─Machine/adumaine-1-md-0-q6nsd-p8fqd                      True                     4m35s

closes #3

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a mechanism to pin the chart version? I gather this is just for KIND right now so I can see that this might not be desirable.

Copy link
Contributor Author

@AshleyDumaine AshleyDumaine Feb 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated this to set the chart version to the latest stable cilium release (1.15.0)

secret:
name: common-init-files
key: kubeadm-pre-init.sh
permissions: "0777"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the nittiest of nits: do these perms need to be so wide?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated to 0500

@AshleyDumaine AshleyDumaine force-pushed the install-cni branch 4 times, most recently from cbc4ab9 to f828004 Compare February 9, 2024 15:10
@AshleyDumaine AshleyDumaine requested a review from avestuk February 9, 2024 17:38
@AshleyDumaine AshleyDumaine merged commit 002e823 into main Feb 9, 2024
6 checks passed
@AshleyDumaine AshleyDumaine deleted the install-cni branch February 9, 2024 18:20
amold1 pushed a commit that referenced this pull request May 17, 2024
…#96)

* add cluster template with bootstrap scripts, use CAAPH to install cilium
* use swapoff instead of trying to set swap disk to 0 to speed up linode
booting
amold1 added a commit that referenced this pull request Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upstream Bootstrap Provider for Kubeadm
4 participants